/*
 * @Description: 
 * @Author: Aroma
 * @Date: 2024-09-25 19:50:32
 * @LastEditors: Aroma
 * @LastEditTime: 2024-09-25 19:56:55
 * @别瞎看: 你个无脑牛马
 */
/**
 * Test04Replace
 */
public class Test04Replace {

    public static void main(String[] args) {
        String str="Hello,world!";
        String newStr=str.replace('l', 'L');
        String newStr1=str.replace("world", "java");
        System.out.println(newStr);//    HeLLo,worLd!    
        System.out.println(newStr1);//   Hello,java!
    }
}